package cn.zjj.feignClient;

import cn.zjj.domain.User;
import cn.zjj.fallbackfactory.UserFallFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "user-server",fallbackFactory = UserFallFactory.class)
@RequestMapping("/user")
public interface UserFeignClient {

    @GetMapping("/selectById/{id}")
    User selectById(@PathVariable("id") Long id);
    @GetMapping("/selectAll")
    List<User> select();
}
